Optimal. Leaf size=37 \[ \frac {x}{2}-\frac {1}{3} \log \left (\tan ^2(x)-\tan (x)+1\right )+\frac {1}{6} \log (\tan (x)+1)-\frac {1}{2} \log (\cos (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {3661, 2074, 635, 203, 260, 628} \[ \frac {x}{2}-\frac {1}{3} \log \left (\tan ^2(x)-\tan (x)+1\right )+\frac {1}{6} \log (\tan (x)+1)-\frac {1}{2} \log (\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 260
Rule 628
Rule 635
Rule 2074
Rule 3661
Rubi steps
\begin {align*} \int \frac {1}{1+\tan ^3(x)} \, dx &=\operatorname {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \left (1+x^3\right )} \, dx,x,\tan (x)\right )\\ &=\operatorname {Subst}\left (\int \left (\frac {1}{6 (1+x)}+\frac {1+x}{2 \left (1+x^2\right )}+\frac {1-2 x}{3 \left (1-x+x^2\right )}\right ) \, dx,x,\tan (x)\right )\\ &=\frac {1}{6} \log (1+\tan (x))+\frac {1}{3} \operatorname {Subst}\left (\int \frac {1-2 x}{1-x+x^2} \, dx,x,\tan (x)\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1+x}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac {1}{6} \log (1+\tan (x))-\frac {1}{3} \log \left (1-\tan (x)+\tan ^2(x)\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (x)\right )+\frac {1}{2} \operatorname {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,\tan (x)\right )\\ &=\frac {x}{2}-\frac {1}{2} \log (\cos (x))+\frac {1}{6} \log (1+\tan (x))-\frac {1}{3} \log \left (1-\tan (x)+\tan ^2(x)\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.03, size = 57, normalized size = 1.54 \[ -\frac {1}{3} \log \left (\tan ^2(x)-\tan (x)+1\right )+\left (\frac {1}{4}-\frac {i}{4}\right ) \log (-\tan (x)+i)+\left (\frac {1}{4}+\frac {i}{4}\right ) \log (\tan (x)+i)+\frac {1}{6} \log (\tan (x)+1) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 48, normalized size = 1.30 \[ \frac {1}{2} \, x + \frac {1}{12} \, \log \left (\frac {\tan \relax (x)^{2} + 2 \, \tan \relax (x) + 1}{\tan \relax (x)^{2} + 1}\right ) - \frac {1}{3} \, \log \left (\frac {\tan \relax (x)^{2} - \tan \relax (x) + 1}{\tan \relax (x)^{2} + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.59, size = 34, normalized size = 0.92 \[ \frac {1}{2} \, x - \frac {1}{3} \, \log \left (\tan \relax (x)^{2} - \tan \relax (x) + 1\right ) + \frac {1}{4} \, \log \left (\tan \relax (x)^{2} + 1\right ) + \frac {1}{6} \, \log \left ({\left | \tan \relax (x) + 1 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 34, normalized size = 0.92 \[ -\frac {\ln \left (1-\tan \relax (x )+\tan ^{2}\relax (x )\right )}{3}+\frac {\ln \left (1+\tan \relax (x )\right )}{6}+\frac {\ln \left (1+\tan ^{2}\relax (x )\right )}{4}+\frac {x}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.75, size = 33, normalized size = 0.89 \[ \frac {1}{2} \, x - \frac {1}{3} \, \log \left (\tan \relax (x)^{2} - \tan \relax (x) + 1\right ) + \frac {1}{4} \, \log \left (\tan \relax (x)^{2} + 1\right ) + \frac {1}{6} \, \log \left (\tan \relax (x) + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.62, size = 41, normalized size = 1.11 \[ \frac {\ln \left (\mathrm {tan}\relax (x)+1\right )}{6}-\frac {\ln \left ({\mathrm {tan}\relax (x)}^2-\mathrm {tan}\relax (x)+1\right )}{3}+\ln \left (\mathrm {tan}\relax (x)-\mathrm {i}\right )\,\left (\frac {1}{4}-\frac {1}{4}{}\mathrm {i}\right )+\ln \left (\mathrm {tan}\relax (x)+1{}\mathrm {i}\right )\,\left (\frac {1}{4}+\frac {1}{4}{}\mathrm {i}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.18, size = 34, normalized size = 0.92 \[ \frac {x}{2} + \frac {\log {\left (\tan {\relax (x )} + 1 \right )}}{6} + \frac {\log {\left (\tan ^{2}{\relax (x )} + 1 \right )}}{4} - \frac {\log {\left (\tan ^{2}{\relax (x )} - \tan {\relax (x )} + 1 \right )}}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________